package com.vains.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = Oauth2Properties.PREFIX)
public class Oauth2Properties {

    static final String PREFIX = "security.oauth2";

    /**
     * 客户端
     */
    private Client client;

    /**
     * 资源相关
     */
    private Resource resource;

    @Data
    public static class Client {

        /**
         * 客户端 ID
         */
        private String clientId;

        /**
         * 客户端 秘钥
         */
        private String clientSecret;

    }

    @Data
    public static class Resource {

        /**
         * 检查token 地址
         */
        private String tokenInfoUri;

    }

}
